<% layout('/layouts/default.html', {title: '评分结果列表', libs: ['dataGrid']}){ %>
<style>
    .menu {
        padding: 8px;
        cursor: pointer;
        margin: 2px 1px 2px;
    }

    .options {
        position: absolute;
        display: none;
        width: 100px;
        height: 100px;
        background: #eee;
        /*overflow: auto;*/
    }

    .menu:hover .options {
        display: block;
    }

</style>
<div class="main-content">
    <div class="box box-main">
        <div class="box-header">
            <#form:form id="searchForm"   action="${ctx}/exam/dcSupExamSumScoreResult/listData" method="post" class="form-inline"
            data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
            <div style="float: right">
<!--                <div class="form-group">-->
<!--                    <label class="control-label">${text('年度')}：</label>-->
<!--                    <div class="control-inline width-120">-->
<!--                        <#form:select path="examYear" items="${yearList}" blankOption="true" data-placeholder="请选择" itemLabel="yearLabel" itemValue="yearValue" class="form-control width-120" defaultValue="2022"/>-->
<!--                    </div>-->
<!--                </div>-->
                <div class="form-group">
                    <label class="control-label">${text('考核标题')}：</label>
                    <div class="control-inline width-160">
                        <#form:input path="examTitle" maxlength="100" class="form-control width-160" placeholder="请输入考核标题"/>
                    </div>
                </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
                    <button onclick="cz();" class="btn btn-default btn-sm">${text('重置')}</button>
                </div>
            </div>
        </#form:form>
        </div>
    <div class="box-body">
        <table id="dataGrid"></table>
        <div id="dataGridPage"></div>
    </div>
</div>
</div>
</div>
<% } %>
<script>
    //重置按钮
    function cz() {
        searchForm.reset();
        $('dataGrid').dataGrid('reloadGrid');
    }

    // 初始化DataGrid对象
    $('#dataGrid').dataGrid({
        searchForm: $("#searchForm"),
        columnModel: [
            {header:'${text("主键")}', name:'id', hidden:true},
            {header:'${text("考核标题")}', name:'examTitle',  width:150, align:"left"},
            {header:'${text("考核年份")}', name:'examYear',  width:100, align:"center"},
            {header:'${text("发布日期")}', name:'createDate',  width:100, align:"center"},
            {header:'操作', name:'testSelect', width:80, align:"center",formatter:function (val,obj,row,act){
                var  actions=[];
                    actions.push('<a href="${ctx}/exam/dcSupExamRanking/danRankingView?examId='+row.id+'" class="btn btn-primary btn-xs btnList" title="${text("评分排名")}"><span>查看</span></a>&emsp;');
                    return actions.join('');
                }
            }
        ],
        // 表格内没有数据的时候是否提示 “无数据显示”
        emptyDataHint: false,
        editGrid: false,
        // 是否显示行号
        showRownum: false,
        // 加载成功后执行事件
        ajaxSuccess: function(data){
        }
    });


</script>